-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
vim.g.neovide_cursor_vfx_mode = "pixiedust"
vim.g.neovide_floating_shadow = false
vim.g.neovide_input_ime = true
vim.g.neovide_cursor_vfx_particle_density = 100.0
vim.g.autoformat = true
-- 输入的时候隐藏鼠标
vim.g.neovide_hide_mouse_when_typing = true
vim.api.nvim_set_hl(0, "PmenuSel", { bg = "#9d7cd8", fg = "#ffffff" })
vim.g.root_spec = { "cwd" }

-- vim.o.winborder='rounded'
local opt = vim.opt
opt.spell = false

opt.conceallevel = 0
opt.wrap = false
opt.cursorline = false
opt.relativenumber = false
opt.guifont = { "Maple Mono NF CN", ":h16" }
opt.guicursor =
  "n-v-c:block,i-ci-ve:ver25,r-cr:hor20,o:hor50,a:blinkwait0-blinkoff0-blinkon0-Cursor/lCursor,sm:block-blinkwait0-blinkoff0-blinkon0"
opt.list = false
opt.listchars = { space = "·" }
-- opt.shellcmdflag = "-command"
-- opt.shellquote = '"'
-- opt.shellxquote = ""
opt.modelines = 0
opt.showcmd = false
opt.scrolloff = 0
-- 设置诊断的 virtual text 颜色
-- vim.api.nvim_set_hl(0, "DiagnosticVirtualTextError", { fg = "#ff6b6b", italic = true })
-- vim.api.nvim_set_hl(0, "DiagnosticVirtualTextWarn", { fg = "#ffd93d", italic = true })
-- vim.api.nvim_set_hl(0, "DiagnosticVirtualTextInfo", { fg = "#6bcf7f", italic = true })
-- vim.api.nvim_set_hl(0, "DiagnosticVirtualTextHint", { fg = "#c792ea", italic = true })
vim.schedule(function()
  vim.api.nvim_set_hl(0, "VirtualTextError", { fg = "#ff5555", italic = true })
end)
-- 设置 fzf-lua 的默认选项
-- vim.g.fzf_lua_opts = {
--   files = {
--     fd_opts = "--type f --exclude install --exclude build --exclude log"
--   }
-- }
vim.api.nvim_create_autocmd("FileType", {
  pattern = "cpp",
  callback = function()
    vim.opt_local.commentstring = "// %s"
  end,
})
